<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            display: flex;
            justify-content: space-around;
            align-items: flex-end;
            border-left: 1px solid pink;
            border-bottom: 1px solid pink;
            width: 700px;
            height: 300px;
            margin: 50px auto;
        }

        .column {
            position: relative;
            background-color: pink;
            width: 30px;

        }

        .column span {
            position: absolute;
            font-size: 14px;
            top: -20px;
        }

        .column h4 {
            margin: 0;
            left: -10px;
            padding: 0;
            position: absolute;
            bottom: -20px;
            font-size: 15px;
            white-space: nowrap;
            /* 保证文字在一行 */

        }
    </style>
</head>

<body>
    <!-- <div class="box">
        <div class="column" style="height: 100px;">
            <span>123</span>
            <h4>第1季度</h4>
        </div>
        <div class="column" style="height: 300px;">
            <span>123</span>
            <h4>第2季度</h4>
        </div>
        <div class="column" style="height: 30px;">
            <span>123</span>
            <h4>第3季度</h4>
        </div>
        <div class="column" style="height: 250px;">
            <span>123</span>
            <h4>第4季度</h4>
        </div>

    </div> -->
    <script>
        let array = []
        for (let i = 1; i <= 4; i++) {

            array.push(prompt(`请输入第${i}季度的数据`))
        }

        document.write(`<div class="box">`)
        for (let i = 0; i < array.length; i++) {
            document.write(`            <div class="column" style="height: ${array[i]}px;">
            <span>${array[i]}</span>
            <h4>第${i}季度</h4>
        </div>`)


        }

        document.write('</div>')
    </script>
</body>

</html>